package com.ulic.customerManApplication.membermodule.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.ulic.customerManApplication.membermodule.bo.Member;
import com.ulic.customerManApplication.membermodule.dao.MemberDao;
import com.ulic.customerManApplication.membermodule.service.MemberService;
import com.ulic.customerManApplication.membermodule.vo.MemberVO;
import com.ulic.customerManApplication.pager.PagerModel;
import com.ulic.customerManApplication.usermodule.bo.User;
@Component("memberService")
public class MemberServiceImpl implements MemberService {

	private MemberDao memberDao;
	
	
	public MemberDao getMemberDao() {
		return memberDao;
	}
    @Resource
	public void setMemberDao(MemberDao memberDao) {
		this.memberDao = memberDao;
	}
	@Override
	public void addMember(Member member) throws Exception {
		memberDao.insertMember(member);
	}
	@Override
	public void addMembers(List<Member> members) throws Exception {
		memberDao.insertMembers(members);
		
	}
	@Override
	public Member getMember(int id) {
		return memberDao.getMember(id);
	}
	@Override
	public void modifyMember(Member member) throws Exception {
		memberDao.updateMember(member);
	}
	@Override
	public void removeMember(Member member) throws Exception {
		memberDao.deleteMember(member);
	}
	@Override
	public PagerModel getMembers(MemberVO memberVO, int curPage) {
		return memberDao.getMembers(memberVO, curPage);
	}
	@Override
	public PagerModel getMembers(int curPage) {
		return memberDao.getMembers(curPage);
	}
	@Override
	public List<Member> getMembers(User user) {
		return memberDao.getMembers(user);
	}
	@Override
	public Member getMember(int type,String condition) {
		return memberDao.getMember(type, condition);
	}
	@Override
	public PagerModel getMembers(MemberVO memberVO, int curPage, int totalNum) {
		return memberDao.getMembers(memberVO, curPage, totalNum);
	}
	@Override
	public List<Object> getMembers(MemberVO memberVO) {
		return memberDao.getMembers(memberVO);
	}

	 
}
